
library(stargazer)
library(car)

## Table 2b

data<-read.csv("Patronage_Coalitions_data.csv")

M4<-lm(Unity1~ Proportionality + Elapse + Idrange,data = data)
M5<-lm(Unity1~ Proportionality + Elapse + Idrange + Net.popularity, data = data)
M6<-lm(Unity1~ Proportionality + Elapse +  Idrange+ Net.popularity+ FHC + Lula + Dilma,data = data)
M7<-lm(Unity1~ Proportionality + Elapse +   FHC + Lula + Dilma,data = data)

M4.1<-lm(Unity1~ Proportionality + Elapse + IDHETERO,data = data)
M5.1<-lm(Unity1~ Proportionality + Elapse + IDHETERO + Net.popularity, data = data)
M6.1<-lm(Unity1~ Proportionality + Elapse +  IDHETERO+ Net.popularity+ FHC + Lula + Dilma,data = data)
M7.1<-lm(Unity1~ Proportionality + Elapse +   FHC + Lula + Dilma,data = data)
stargazer(M4, M5, M6, M7, M4.1, M5.1, M6.1, M7.1, type='latex', header=FALSE, no.space=TRUE, omit.stat=c("LL","ser","f"), column.labels=c("2.2","2.4","2.5", "2.6"), title= "Table 2b")


## Table 3
r10<-lm(Unity1~ Proportionality + Elapse + FHC + Lula + Dilma,data = data)
r11<-lm(Unity1~ Proportionality + Proportionality_DAS + Elapse +  FHC + Lula + Dilma,data = data)
r12<-lm(Unity1~  Proportionality +Proportionality_DAS6 + Elapse + FHC + Lula + Dilma,data = data)

stargazer(r10,r11,r12, type='latex', header=FALSE, no.space=TRUE, omit.stat=c("LL","ser","f"), column.labels=c("2.6","3.1","3.2"), title= "Table 3")


